// Copyright (c) 2024，D-Robotics.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/***************************************************************************
* COPYRIGHT NOTICE
* Copyright 2019 Horizon Robotics, Inc.
* All rights reserved.
***************************************************************************/
#ifndef UTILITY_SENSOR_INC_AR0820STD_SETTING_H_
#define UTILITY_SENSOR_INC_AR0820STD_SETTING_H_

#define AR0820_PARAM_HOLD       (0x3022)
#define AR0820_GAIN         	(0x3366)
#define AR0820_FINE_GAIN	    (0x336a)
#define AR0820_DGAIN		    (0x3308)
#define AR0820_DC_GAIN		    (0x3362)
#define AR0820_LINE             (0x3012)
#define AR0820_LINE_S           (0x3212)
#define AR0820_VTS	          	(0x300A)
#define AR0820_HTS	        	(0x300C)
#define AR0820_X_START          (0x3004)
#define AR0820_Y_START          (0x3002)
#define AR0820_X_END            (0x3008)
#define AR0820_Y_END            (0x3006)
#define REG_EXP_NUM             (0x3082)
#define VT_PIX_CLK_DIV          (0x302A)
#define VT_SYS_CLK_DIV          (0x302C)
#define PRE_PLL_CLK_DIV         (0x302E)
#define PLL_MULTIPLIER          (0x3030)
#define AR0820_MIRROR_FLIP      (0x3040)

#define EEPROM_IIC_ADDR_READ 	(0x50)
#define VERSION_ADDR 			(0x0000)
#define VENDOR_ADDR 			(0x0004)
#define MODULE_SERIAL_ADDR 		(0x0008)
#define CAM_TYPE_ADDR 			(0x0010)
#define IMG_HEIGHT_ADDR 		(0x001C)
#define IMG_WIDTH_ADDR 			(0x001E)
#define FOV_ADDR 				(0x0020)
#define EFL_X_ADDR 				(0x0040)
#define EFL_Y_ADDR 				(0x0048)
#define COD_X_ADDR 				(0x0050)
#define COD_Y_ADDR 				(0x0058)
#define K1_ADDR 				(0x00C0)
#define K2_ADDR 				(0x00C8)
#define P1_ADDR 				(0x00D0)
#define P2_ADDR 				(0x00D8)
#define K3_ADDR 				(0x00E0)
#define K4_ADDR 				(0x00E8)
#define K5_ADDR 				(0x00F0)
#define K6_ADDR 				(0x00F8)

enum MODE_TYPE {
	SUNNY_M25F120D12G3_S1R8T2,
	SENSING_M27F120D12G3_S0R0T7,
	SUNNY_M25F120D12G3_S0R8T7E0,
	MODE_TYPE_MAX,
	MODE_TYPE_NUM,
};

enum sensor_debug_mode {
	SCALER_WEIGHT9331 = 1,
	SCALER_TRUE_BAYER,
	SCALER_WEIGHT2110,
};

typedef struct reg_setting_data {
	uint32_t *pdata;
	uint32_t size;
}reg_setting_data_t;

#define VAA_ADC		0x20CE
#define VAA_SLOPE	0x3C2A
#define VAAPIX_ADC	0x20CC
#define VAAPIX_SLOPE	0x3C28
#define VDD_ADC		0x20D2
#define VDD_SLOPE	0x3C2E
#define VDDPIN_ADC	0x20D0
#define VDDPIN_SLOPE	0x3C2C
#define VDDIO_ADC	0x20D4
#define VDDIO_SLOPE	0x3C30
#define OFFSET		0x3C4A

#define AR0820_VAA_H		3000  // mV high
#define AR0820_VAA_L		2600  // mV low
#define AR0820_VAAPIX_H 	3000
#define AR0820_VAAPIX_L 	2600
#define AR0820_VDD_H		1260
#define AR0820_VDD_L		1000  // 1140-->1000
#define AR0820_VDDPIN_H		1260
#define AR0820_VDDPIN_L		1000  // 1140-->1000
#define AR0820_VDDIO_H		1900
#define AR0820_VDDIO_L		1600
#define VAA_coefficient		2800
#define VDD_coefficient		1200
#define VDDIO_coefficient	1800

#define CAM_INJECT_ADDR		0x3C0A
#define DES_ADDR		0x28

enum ar0820_subid {
	AR0820_ERRB_ERROR = 0,
	AR0820_VAA_ERROR,
	AR0820_VAAPIX_ERROR,
	AR0820_VDD_ERROR,
	AR0820_VDDPIN_ERROR,
	AR0820_VDDIO_ERROR,
};

enum max9296_subid {
	MAX9296_ERRB_ERROR = 0,
	LFT_INT_ERROR,
};

uint32_t ar0820_vlotage_setting[] = {
	0x3e94, 0x2000,		//  TEMPVSENS1_SREG_TRIM0(default 0x2f0e)
	0x3e98, 0x4000,
	0x3e9c, 0x0003,
	0x3e9e, 0xffff,
	0x30b8, 0x000f,
	0x30b8, 0x0007,		// enable temp sensor
	0x3f92, 0x5400,
	0x3544, 0x0200,
};

uint32_t rccb_ar0820_dcgain[] = {
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,

	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
};

uint32_t rccb_ar0820_gain[] = {
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x0,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
};
uint32_t rccb_ar0820_fine_gain[] = {
	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x444,
	0x444,
	0x555,
	0x555,
	0x666,
	0x666,
	0x777,
	0x777,
	0x888,
	0x888,
	0x999,
	0x999,
	0xAAA,
	0xAAA,
	0xBBB,
	0xCCC,
	0xCCC,
	0xDDD,
	0xDDD,
	0xEEE,
	0xFFF,

	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x444,
	0x444,
	0x555,
	0x555,
	0x666,
	0x666,
	0x777,
	0x777,
	0x888,
	0x888,
	0x999,
	0x999,
	0xAAA,
	0xAAA,
	0xBBB,
	0xCCC,
	0xCCC,
	0xDDD,
	0xDDD,
	0xEEE,
	0xFFF,

	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x444,
	0x444,
	0x555,
	0x555,
	0x666,
	0x666,
	0x777,
	0x777,
	0x888,
	0x888,
	0x999,
	0x999,
	0xAAA,
	0xAAA,
	0xBBB,
	0xCCC,
	0xCCC,
	0xDDD,
	0xEEE,
	0xEEE,
	0xFFF,
	0xFFF,

	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
};

uint32_t rccb_ar0820_dgain[] = {
	0x200,
	0x20B,
	0x216,
	0x202,
	0x20D,
	0x219,
	0x207,
	0x213,
	0x200,
	0x20E,
	0x21B,
	0x209,
	0x217,
	0x206,
	0x215,
	0x204,
	0x20E,
	0x203,
	0x20E,
	0x203,
	0x20E,
	0x204,
	0x20F,
	0x206,
	0x211,
	0x209,
	0x202,
	0x20D,
	0x206,
	0x211,
	0x20B,
	0x205,
	0x200,
	0x20B,
	0x216,
	0x202,
	0x20D,
	0x219,
	0x206,
	0x211,
	0x201,
	0x20C,
	0x217,
	0x208,
	0x231,
	0x205,
	0x210,
	0x203,
	0x20E,
	0x203,
	0x20E,
	0x203,
	0x20E,
	0x204,
	0x210,
	0x207,
	0x212,
	0x209,
	0x202,
	0x20D,
	0x206,
	0x212,
	0x20B,
	0x205,
	0x200,
	0x20B,
	0x216,
	0x202,
	0x20D,
	0x219,
	0x206,
	0x212,
	0x201,
	0x20C,
	0x217,
	0x208,
	0x213,
	0x205,
	0x211,
	0x203,
	0x20E,
	0x202,
	0x20E,
	0x203,
	0x20E,
	0x204,
	0x210,
	0x206,
	0x212,
	0x209,
	0x202,
	0x20D,
	0x206,
	0x211,
	0x20B,
	0x205,
	0x210,
	0x21C,
	0x228,
	0x234,
	0x240,
	0x24D,
	0x25A,
	0x267,
	0x274,
	0x282,
	0x290,
	0x29F,
	0x2AD,
	0x2BC,
	0x2CC,
	0x2DB,
	0x2EB,
	0x2FC,
	0x30C,
	0x31E,
	0x32F,
	0x341,
	0x353,
	0x366,
	0x379,
	0x38C,
	0x3A0,
	0x3B4,
	0x3C9,
	0x3DE,
	0x3F4,
	0x40A,
	0x421,
	0x438,
	0x450,
	0x468,
	0x481,
	0x49A,
	0x4B4,
	0x4CE,
	0x4E9,
	0x504,
	0x521,
	0x53D,
	0x55B,
	0x579,
	0x598,
	0x5B7,
	0x5D7,
	0x5F7,
	0x619,
	0x63B,
	0x65E,
	0x682,
	0x6A6,
	0x6CB,
	0x6F2,
	0x718,
	0x740,
	0x769,
	0x792,
	0x7BD,
	0x7E8,
};

uint32_t rggb_ar0820_dcgain[] = {
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
	0xf,
};

uint32_t rggb_ar0820_gain[] = {
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
	0x333,
};

uint32_t rggb_ar0820_fine_gain[] = {
	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x444,
	0x444,
	0x555,
	0x555,
	0x666,
	0x666,
	0x777,
	0x777,
	0x888,
	0x888,
	0x999,
	0x999,
	0xAAA,
	0xAAA,
	0xBBB,
	0xCCC,
	0xCCC,
	0xDDD,
	0xDDD,
	0xEEE,
	0xFFF,
	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x444,
	0x444,
	0x555,
	0x555,
	0x666,
	0x666,
	0x777,
	0x777,
	0x888,
	0x888,
	0x999,
	0x999,
	0xAAA,
	0xAAA,
	0xBBB,
	0xCCC,
	0xCCC,
	0xDDD,
	0xDDD,
	0xEEE,
	0xFFF,
	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x444,
	0x444,
	0x555,
	0x555,
	0x666,
	0x666,
	0x777,
	0x777,
	0x888,
	0x888,
	0x999,
	0x999,
	0xAAA,
	0xAAA,
	0xBBB,
	0xCCC,
	0xCCC,
	0xDDD,
	0xEEE,
	0xEEE,
	0xFFF,
	0x000,
	0x000,
	0x000,
	0x111,
	0x111,
	0x111,
	0x222,
	0x222,
	0x333,
	0x333,
	0x333,
	0x444,
	0x444,
	0x555,
	0x555,
	0x666,
	0x666,
	0x777,
	0x777,
	0x888,
	0x888,
	0x999,
	0x999,
	0xAAA,
	0xAAA,
	0xBBB,
	0xCCC,
	0xCCC,
	0xDDD,
	0xDDD,
	0xEEE,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
	0xFFF,
};

uint32_t rggb_ar0820_dgain[] = {
	0x200,
	0x20B,
	0x216,
	0x202,
	0x20D,
	0x219,
	0x207,
	0x213,
	0x200,
	0x20E,
	0x21B,
	0x209,
	0x217,
	0x206,
	0x215,
	0x204,
	0x20E,
	0x203,
	0x20E,
	0x203,
	0x20E,
	0x204,
	0x20F,
	0x206,
	0x211,
	0x209,
	0x202,
	0x20D,
	0x206,
	0x211,
	0x20B,
	0x205,
	0x200,
	0x20B,
	0x216,
	0x202,
	0x20D,
	0x219,
	0x206,
	0x211,
	0x201,
	0x20C,
	0x217,
	0x208,
	0x231,
	0x205,
	0x210,
	0x203,
	0x20E,
	0x203,
	0x20E,
	0x203,
	0x20E,
	0x204,
	0x210,
	0x207,
	0x212,
	0x209,
	0x202,
	0x20D,
	0x206,
	0x212,
	0x20B,
	0x205,
	0x200,
	0x20B,
	0x216,
	0x202,
	0x20D,
	0x219,
	0x206,
	0x212,
	0x201,
	0x20C,
	0x217,
	0x208,
	0x213,
	0x205,
	0x211,
	0x203,
	0x20E,
	0x202,
	0x20E,
	0x203,
	0x20E,
	0x204,
	0x210,
	0x206,
	0x212,
	0x209,
	0x202,
	0x20D,
	0x206,
	0x211,
	0x20B,
	0x205,
	0x200,
	0x20b,
	0x216,
	0x201,
	0x20d,
	0x219,
	0x206,
	0x211,
	0x200,
	0x20c,
	0x217,
	0x207,
	0x213,
	0x204,
	0x210,
	0x203,
	0x20E,
	0x202,
	0x20E,
	0x203,
	0x20E,
	0x204,
	0x20F,
	0x206,
	0x211,
	0x209,
	0x201,
	0x20d,
	0x206,
	0x211,
	0x20a,
	0x205,
	0x210,
	0x21c,
	0x227,
	0x234,
	0x240,
	0x24c,
	0x259,
	0x267,
	0x274,
	0x282,
	0x290,
	0x29e,
	0x2ad,
	0x2bc,
	0x2cb,
	0x2db,
	0x2eb,
	0x2fb,
	0x30c,
	0x31d,
	0x32f,
	0x340,
	0x353,
	0x365,
	0x378,
	0x38c,
	0x3a0,
	0x3b4,
	0x3c9,
	0x3de,
	0x3f4,
	0x40a,
	0x421,
	0x438,
	0x44f,
	0x468,
	0x480,
	0x499,
	0x4b3,
	0x4ce,
	0x4e9,
	0x504,
	0x520,
	0x53d,
	0x55a,
	0x578,
	0x597,
	0x5b6,
	0x5d6,
	0x5f7,
	0x619,
	0x63b,
	0x65e,
	0x681,
	0x6a6,
	0x6cb,
	0x6f1,
	0x718,
	0x740,
	0x769,
	0x792,
	0x7bd,
	0x7e8,
};

uint32_t rggb_ar0820_hdr4_gain[] = {
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x0000,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x1111,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x2222,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
	0x3333,
};

uint32_t rggb_ar0820_hdr4_fine_gain[] = {
	0x0000,
	0x0000,
	0x0000,
	0x1111,
	0x1111,
	0x1111,
	0x2222,
	0x2222,
	0x3333,
	0x3333,
	0x3333,
	0x4444,
	0x4444,
	0x5555,
	0x5555,
	0x6666,
	0x6666,
	0x7777,
	0x7777,
	0x8888,
	0x8888,
	0x9999,
	0x9999,
	0xAAAA,
	0xAAAA,
	0xBBBB,
	0xCCCC,
	0xCCCC,
	0xDDDD,
	0xDDDD,
	0xEEEE,
	0xFFFF,
	0x0000,
	0x0000,
	0x0000,
	0x1111,
	0x1111,
	0x1111,
	0x2222,
	0x2222,
	0x3333,
	0x3333,
	0x3333,
	0x4444,
	0x4444,
	0x5555,
	0x5555,
	0x6666,
	0x6666,
	0x7777,
	0x7777,
	0x8888,
	0x8888,
	0x9999,
	0x9999,
	0xAAAA,
	0xAAAA,
	0xBBBB,
	0xCCCC,
	0xCCCC,
	0xDDDD,
	0xDDDD,
	0xEEEE,
	0xFFFF,
	0x0000,
	0x0000,
	0x0000,
	0x1111,
	0x1111,
	0x1111,
	0x2222,
	0x2222,
	0x3333,
	0x3333,
	0x3333,
	0x4444,
	0x4444,
	0x5555,
	0x5555,
	0x6666,
	0x6666,
	0x7777,
	0x7777,
	0x8888,
	0x8888,
	0x9999,
	0x9999,
	0xAAAA,
	0xAAAA,
	0xBBBB,
	0xCCCC,
	0xCCCC,
	0xDDDD,
	0xEEEE,
	0xEEEE,
	0xFFFF,
	0x0000,
	0x0000,
	0x0000,
	0x1111,
	0x1111,
	0x1111,
	0x2222,
	0x2222,
	0x3333,
	0x3333,
	0x3333,
	0x4444,
	0x4444,
	0x5555,
	0x5555,
	0x6666,
	0x6666,
	0x7777,
	0x7777,
	0x8888,
	0x8888,
	0x9999,
	0x9999,
	0xAAAA,
	0xAAAA,
	0xBBBB,
	0xCCCC,
	0xCCCC,
	0xDDDD,
	0xDDDD,
	0xEEEE,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
	0xFFFF,
};

uint32_t ar0820_linear_30fps_init_setting[] = {
	// Sensor AR0820 config
	DELAY_FLAG, 0x20,
	0x301a, 0x0059,
	DELAY_FLAG, 0x20,
	0x301a, 0x0058,
	DELAY_FLAG, 0x20,
	0x2512, 0x8000,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xff07,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0x3001,
	0x2510, 0x3010,
	0x2510, 0x3006,
	0x2510, 0x3020,
	0x2510, 0x3008,
	0x2510, 0xb031,
	0x2510, 0xa824,
	0x2510, 0x003c,
	0x2510, 0x001f,
	0x2510, 0xb2f9,
	0x2510, 0x006f,
	0x2510, 0x0078,
	0x2510, 0x005c,
	0x2510, 0x106f,
	0x2510, 0xc013,
	0x2510, 0x006e,
	0x2510, 0x0079,
	0x2510, 0x007b,
	0x2510, 0xc806,
	0x2510, 0x106e,
	0x2510, 0x0017,
	0x2510, 0x0013,
	0x2510, 0x004b,
	0x2510, 0x0002,
	0x2510, 0x90f2,
	0x2510, 0x90ff,
	0x2510, 0xd034,
	0x2510, 0x1032,
	0x2510, 0x0000,
	0x2510, 0x0033,
	0x2510, 0x00d1,
	0x2510, 0x092e,
	0x2510, 0x1333,
	0x2510, 0x123d,
	0x2510, 0x045b,
	0x2510, 0x11bb,
	0x2510, 0x133a,
	0x2510, 0x1013,
	0x2510, 0x1017,
	0x2510, 0x1015,
	0x2510, 0x1099,
	0x2510, 0x14db,
	0x2510, 0x00dd,
	0x2510, 0x3088,
	0x2510, 0x3084,
	0x2510, 0x2003,
	0x2510, 0x11f9,
	0x2510, 0x02da,
	0x2510, 0xd80c,
	0x2510, 0x2006,
	0x2510, 0x017a,
	0x2510, 0x01f0,
	0x2510, 0x14f0,
	0x2510, 0x008b,
	0x2510, 0x10f8,
	0x2510, 0x118b,
	0x2510, 0x00ed,
	0x2510, 0x00e4,
	0x2510, 0x0072,
	0x2510, 0x203b,
	0x2510, 0x8828,
	0x2510, 0x2003,
	0x2510, 0x1064,
	0x2510, 0x0063,
	0x2510, 0x1072,
	0x2510, 0x003e,
	0x2510, 0xc00a,
	0x2510, 0x05cd,
	0x2510, 0x006e,
	0x2510, 0x100e,
	0x2510, 0x0019,
	0x2510, 0x0015,
	0x2510, 0x16ee,
	0x2510, 0x0071,
	0x2510, 0x10be,
	0x2510, 0x1063,
	0x2510, 0x1671,
	0x2510, 0x1095,
	0x2510, 0x1019,
	0x2510, 0x3088,
	0x2510, 0x3084,
	0x2510, 0x2003,
	0x2510, 0x018b,
	0x2510, 0x110b,
	0x2510, 0x117b,
	0x2510, 0x00e4,
	0x2510, 0x0072,
	0x2510, 0x20c4,
	0x2510, 0x1064,
	0x2510, 0x107a,
	0x2510, 0x1072,
	0x2510, 0x3041,
	0x2510, 0xd800,
	0x2510, 0x881a,
	0x2510, 0x100c,
	0x2510, 0x000e,
	0x2510, 0x100d,
	0x2510, 0x3081,
	0x2510, 0x10cb,
	0x2510, 0x1052,
	0x2510, 0x0038,
	0x2510, 0xc200,
	0x2510, 0xca00,
	0x2510, 0xd230,
	0x2510, 0x8200,
	0x2510, 0x11ae,
	0x2510, 0xb041,
	0x2510, 0xd000,
	0x2510, 0x106d,
	0x2510, 0x101f,
	0x2510, 0x100e,
	0x2510, 0x100a,
	0x2510, 0x3042,
	0x2510, 0x3086,
	0x2510, 0x102f,
	0x2510, 0x3090,
	0x2510, 0x9010,
	0x2510, 0xb000,
	0x2510, 0x30a0,
	0x2510, 0x1016,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x3508, 0xaa80,
	0x350a, 0xc5c0,
	0x350c, 0xc8c4,
	0x350e, 0x8c8c,
	0x3510, 0x8c88,
	0x3512, 0x8c8c,
	0x3514, 0xa0a0,
	0x3518, 0x0040,
	0x351a, 0x8600,
	0x351e, 0x0e40,
	0x3506, 0x004a,
	0x3520, 0x0e19,
	0x3522, 0x7f7f,
	0x3524, 0x7f7f,
	0x3526, 0x7f7f,
	0x3528, 0x7f7f,
	0x30fe, 0x00a8,
	0x3584, 0x0000,
	0x3540, 0x8308,
	0x354c, 0x0031,
	0x354e, 0x535c,
	0x3550, 0x5c7f,
	0x3552, 0x0011,
	0x3370, 0x0111,
	0x337a, 0x0f50,
	0x337e, 0xfff8,
	0x3110, 0x0011,
	0x3100, 0x4000,
	0x3364, 0x0173,
	0x3180, 0x0021,
	0x3e4c, 0x0404,
	0x3e52, 0x0060,
	0x3180, 0x0021,
	0x37a0, 0x0001,
	0x37a4, 0x0000,
	0x37a8, 0x0000,
	0x37ac, 0x0000,
	0x3e94, 0x3014,
	0x3372, 0xf50f,
	0x302a, 0x0003,
	0x302c, 0x0701,
	0x302e, 0x0009,
	0x3030, 0x009c,
	0x3036, 0x0006,
	0x3038, 0x0001,
	0x303a, 0x0085,
	0x303c, 0x0003,
	0x31b0, 0x0047,
	0x31b2, 0x0026,
	0x31b4, 0x5187,
	0x31b6, 0x5248,
	0x31b8, 0x70ca,
	0x31ba, 0x028a,
	0x31bc, 0x8a88,
	0x31be, 0x0023,
	0x3002, 0x0004,
	0x3004, 0x0004,
	0x3006, 0x0873,
	0x3008, 0x0F03,
	0x32fc, 0x0000,
	0x37e0, 0x8421,
	0x37e2, 0x8421,
	0x323c, 0x8421,
	0x323e, 0x8421,
	0x3040, 0xc000,
	0x3010, 0xbeef,
	0x3040, 0xc000,
	0x3082, 0x0000,
	0x30ba, 0x1110,
	0x3012, 0x016e,
	0x3362, 0x00ff,
	0x3366, 0x0000,
	0x336a, 0x0000,
	0x300c, 0x1158,
	0x300a, 0x0920,
	0x31ae, 0x0204,
	0x31ac, 0x0c0c,
	0x3064, 0x0000,
	0x3012, 0x002e,
	0x3366, 0x0001,
	0x336a, 0x0001,
	0x3352, 0x000e,
	DELAY_FLAG, 0x20,
};

uint32_t ar0820_dol2_15fps_init_setting[] = {
	 0x301A, 0x005D, 	// RESET_REGISTER
	 DELAY_FLAG, 0xC8,
	 0x301A, 0x0058, 	// RESET_REGISTER
	 0x2512, 0x8000, 	// SEQ_CTRL_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFF07, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0x3001, 	// SEQ_DATA_PORT
	 0x2510, 0x3010, 	// SEQ_DATA_PORT
	 0x2510, 0x3006, 	// SEQ_DATA_PORT
	 0x2510, 0x3020, 	// SEQ_DATA_PORT
	 0x2510, 0x3008, 	// SEQ_DATA_PORT
	 0x2510, 0xB031, 	// SEQ_DATA_PORT
	 0x2510, 0xA824, 	// SEQ_DATA_PORT
	 0x2510, 0x003C, 	// SEQ_DATA_PORT
	 0x2510, 0x001F, 	// SEQ_DATA_PORT
	 0x2510, 0xB2F9, 	// SEQ_DATA_PORT
	 0x2510, 0x006F, 	// SEQ_DATA_PORT
	 0x2510, 0x0078, 	// SEQ_DATA_PORT
	 0x2510, 0x005C, 	// SEQ_DATA_PORT
	 0x2510, 0x106F, 	// SEQ_DATA_PORT
	 0x2510, 0xC013, 	// SEQ_DATA_PORT
	 0x2510, 0x006E, 	// SEQ_DATA_PORT
	 0x2510, 0x0079, 	// SEQ_DATA_PORT
	 0x2510, 0x007B, 	// SEQ_DATA_PORT
	 0x2510, 0xC806, 	// SEQ_DATA_PORT
	 0x2510, 0x106E, 	// SEQ_DATA_PORT
	 0x2510, 0x0017, 	// SEQ_DATA_PORT
	 0x2510, 0x0013, 	// SEQ_DATA_PORT
	 0x2510, 0x004B, 	// SEQ_DATA_PORT
	 0x2510, 0x0002, 	// SEQ_DATA_PORT
	 0x2510, 0x90F2, 	// SEQ_DATA_PORT
	 0x2510, 0x90FF, 	// SEQ_DATA_PORT
	 0x2510, 0xD034, 	// SEQ_DATA_PORT
	 0x2510, 0x1032, 	// SEQ_DATA_PORT
	 0x2510, 0x0000, 	// SEQ_DATA_PORT
	 0x2510, 0x0033, 	// SEQ_DATA_PORT
	 0x2510, 0x00D1, 	// SEQ_DATA_PORT
	 0x2510, 0x092E, 	// SEQ_DATA_PORT
	 0x2510, 0x1333, 	// SEQ_DATA_PORT
	 0x2510, 0x123D, 	// SEQ_DATA_PORT
	 0x2510, 0x045B, 	// SEQ_DATA_PORT
	 0x2510, 0x11BB, 	// SEQ_DATA_PORT
	 0x2510, 0x133A, 	// SEQ_DATA_PORT
	 0x2510, 0x1013, 	// SEQ_DATA_PORT
	 0x2510, 0x1017, 	// SEQ_DATA_PORT
	 0x2510, 0x1015, 	// SEQ_DATA_PORT
	 0x2510, 0x1099, 	// SEQ_DATA_PORT
	 0x2510, 0x14DB, 	// SEQ_DATA_PORT
	 0x2510, 0x00DD, 	// SEQ_DATA_PORT
	 0x2510, 0x3088, 	// SEQ_DATA_PORT
	 0x2510, 0x3084, 	// SEQ_DATA_PORT
	 0x2510, 0x2003, 	// SEQ_DATA_PORT
	 0x2510, 0x11F9, 	// SEQ_DATA_PORT
	 0x2510, 0x02DA, 	// SEQ_DATA_PORT
	 0x2510, 0xD80C, 	// SEQ_DATA_PORT
	 0x2510, 0x2006, 	// SEQ_DATA_PORT
	 0x2510, 0x017A, 	// SEQ_DATA_PORT
	 0x2510, 0x01F0, 	// SEQ_DATA_PORT
	 0x2510, 0x14F0, 	// SEQ_DATA_PORT
	 0x2510, 0x008B, 	// SEQ_DATA_PORT
	 0x2510, 0x10F8, 	// SEQ_DATA_PORT
	 0x2510, 0x118B, 	// SEQ_DATA_PORT
	 0x2510, 0x00ED, 	// SEQ_DATA_PORT
	 0x2510, 0x00E4, 	// SEQ_DATA_PORT
	 0x2510, 0x0072, 	// SEQ_DATA_PORT
	 0x2510, 0x203B, 	// SEQ_DATA_PORT
	 0x2510, 0x8828, 	// SEQ_DATA_PORT
	 0x2510, 0x2003, 	// SEQ_DATA_PORT
	 0x2510, 0x1064, 	// SEQ_DATA_PORT
	 0x2510, 0x0063, 	// SEQ_DATA_PORT
	 0x2510, 0x1072, 	// SEQ_DATA_PORT
	 0x2510, 0x003E, 	// SEQ_DATA_PORT
	 0x2510, 0xC00A, 	// SEQ_DATA_PORT
	 0x2510, 0x05CD, 	// SEQ_DATA_PORT
	 0x2510, 0x006E, 	// SEQ_DATA_PORT
	 0x2510, 0x100E, 	// SEQ_DATA_PORT
	 0x2510, 0x0019, 	// SEQ_DATA_PORT
	 0x2510, 0x0015, 	// SEQ_DATA_PORT
	 0x2510, 0x16EE, 	// SEQ_DATA_PORT
	 0x2510, 0x0071, 	// SEQ_DATA_PORT
	 0x2510, 0x10BE, 	// SEQ_DATA_PORT
	 0x2510, 0x1063, 	// SEQ_DATA_PORT
	 0x2510, 0x1671, 	// SEQ_DATA_PORT
	 0x2510, 0x1095, 	// SEQ_DATA_PORT
	 0x2510, 0x1019, 	// SEQ_DATA_PORT
	 0x2510, 0x3088, 	// SEQ_DATA_PORT
	 0x2510, 0x3084, 	// SEQ_DATA_PORT
	 0x2510, 0x2003, 	// SEQ_DATA_PORT
	 0x2510, 0x018B, 	// SEQ_DATA_PORT
	 0x2510, 0x110B, 	// SEQ_DATA_PORT
	 0x2510, 0x117B, 	// SEQ_DATA_PORT
	 0x2510, 0x00E4, 	// SEQ_DATA_PORT
	 0x2510, 0x0072, 	// SEQ_DATA_PORT
	 0x2510, 0x20C4, 	// SEQ_DATA_PORT
	 0x2510, 0x1064, 	// SEQ_DATA_PORT
	 0x2510, 0x107A, 	// SEQ_DATA_PORT
	 0x2510, 0x1072, 	// SEQ_DATA_PORT
	 0x2510, 0x3041, 	// SEQ_DATA_PORT
	 0x2510, 0xD800, 	// SEQ_DATA_PORT
	 0x2510, 0x881A, 	// SEQ_DATA_PORT
	 0x2510, 0x100C, 	// SEQ_DATA_PORT
	 0x2510, 0x000E, 	// SEQ_DATA_PORT
	 0x2510, 0x100D, 	// SEQ_DATA_PORT
	 0x2510, 0x3081, 	// SEQ_DATA_PORT
	 0x2510, 0x10CB, 	// SEQ_DATA_PORT
	 0x2510, 0x1052, 	// SEQ_DATA_PORT
	 0x2510, 0x0038, 	// SEQ_DATA_PORT
	 0x2510, 0xC200, 	// SEQ_DATA_PORT
	 0x2510, 0xCA00, 	// SEQ_DATA_PORT
	 0x2510, 0xD230, 	// SEQ_DATA_PORT
	 0x2510, 0x8200, 	// SEQ_DATA_PORT
	 0x2510, 0x11AE, 	// SEQ_DATA_PORT
	 0x2510, 0xB041, 	// SEQ_DATA_PORT
	 0x2510, 0xD000, 	// SEQ_DATA_PORT
	 0x2510, 0x106D, 	// SEQ_DATA_PORT
	 0x2510, 0x101F, 	// SEQ_DATA_PORT
	 0x2510, 0x100E, 	// SEQ_DATA_PORT
	 0x2510, 0x100A, 	// SEQ_DATA_PORT
	 0x2510, 0x3042, 	// SEQ_DATA_PORT
	 0x2510, 0x3086, 	// SEQ_DATA_PORT
	 0x2510, 0x102F, 	// SEQ_DATA_PORT
	 0x2510, 0x3090, 	// SEQ_DATA_PORT
	 0x2510, 0x9010, 	// SEQ_DATA_PORT
	 0x2510, 0xB000, 	// SEQ_DATA_PORT
	 0x2510, 0x30A0, 	// SEQ_DATA_PORT
	 0x2510, 0x1016, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x3508, 0xAA80, 	// DAC_LD_8_9
	 0x350A, 0xC5C0, 	// DAC_LD_10_11
	 0x350C, 0xC8C4, 	// DAC_LD_12_13
	 0x350E, 0x8C8C, 	// DAC_LD_14_15
	 0x3510, 0x8C88, 	// DAC_LD_16_17
	 0x3512, 0x8C8C, 	// DAC_LD_18_19
	 0x3514, 0xA0A0, 	// DAC_LD_20_21
	 0x3518, 0x0040, 	// DAC_LD_24_25
	 0x351A, 0x8600, 	// DAC_LD_26_27
	 0x351E, 0x0E40, 	// DAC_LD_30_31
	 0x3506, 0x004A, 	// DAC_LD_6_7
	 0x3520, 0x0E19, 	// DAC_LD_32_33
	 0x3522, 0x7F7F, 	// DAC_LD_34_35
	 0x3524, 0x7F7F, 	// DAC_LD_36_37
	 0x3526, 0x7F7F, 	// DAC_LD_38_39
	 0x3528, 0x7F7F, 	// DAC_LD_40_41
	 0x3584, 0x0000, 	// ROW_AB_CTRL
	 0x3540, 0x8308, 	// DAC_LD_64_65
	 0x354C, 0x0031, 	// DAC_LD_76_77
	 0x354E, 0x535C, 	// DAC_LD_78_79
	 0x3550, 0x5C7F, 	// DAC_LD_80_81
	 0x3552, 0x0011, 	// DAC_LD_82_83
	 0x3370, 0x0111, 	// DBLC_CONTROL
	 0x337A, 0x0F50, 	// DBLC_SCALE0
	 0x337E, 0xFFF8, 	// DBLC_OFFSET0
	 0x3110, 0x0011, 	// HDR_CONTROL0
	 0x3100, 0x4000, 	// DLO_CONTROL0
	 0x3364, 0x0173, 	// DCG_TRIM
	 0x3180, 0x0021, 	// DELTA_DK_CONTROL
	 0x3E4C, 0x0404, 	// ROW_NOISE_DDK_FILTER_CONF
	 0x3E52, 0x0060, 	// ROW_NOISE_DDK_KERNEL_SIZE
	 0x3180, 0x0021, 	// DELTA_DK_CONTROL
	 0x37A0, 0x0001, 	// COARSE_INTEGRATION_AD_TIME
	 0x37A4, 0x0000, 	// COARSE_INTEGRATION_AD_TIME2
	 0x37A8, 0x0000, 	// COARSE_INTEGRATION_AD_TIME3
	 0x37AC, 0x0000, 	// COARSE_INTEGRATION_AD_TIME4
	 0x3E94, 0x3015, 	// TEMPVSENS1_SREG_TRIM0
	 0x3F92, 0x5400, 	// TEMPVSENS1_TMG_CTRL
	 0x3372, 0xF51F, 	// DBLC_FS0_CONTROL
	 0x302A, 0x0003, 	// VT_PIX_CLK_DIV
	 0x302C, 0x0701, 	// VT_SYS_CLK_DIV
	 0x302E, 0x0009, 	// PRE_PLL_CLK_DIV
	 0x3030, 0x009C, 	// PLL_MULTIPLIER
	 0x3036, 0x0006, 	// OP_WORD_CLK_DIV
	 0x3038, 0x0001, 	// OP_SYS_CLK_DIV
	 0x303C, 0x0003, 	// PRE_PLL_CLK_DIV_ANA
	 0x303A, 0x0085, 	// PLL_MULTIPLIER_ANA
	 0x31B0, 0x004A, 	// FRAME_PREAMBLE
	 0x31B2, 0x0027, 	// LINE_PREAMBLE
	 0x31B4, 0x5187, 	// MIPI_TIMING_0
	 0x31B6, 0x6288, 	// MIPI_TIMING_1
	 0x31B8, 0x710A, 	// MIPI_TIMING_2
	 0x31BA, 0x030A, 	// MIPI_TIMING_3
	 0x31BC, 0x8A88, 	// MIPI_TIMING_4
	 0x31BE, 0x0023, 	// MIPI_CONFIG_STATUS
	 0x31C8, 0x0ABE, 	// MIPI_DESKEW_PAT_WIDTH
	 0x31AE, 0x0204, 	// SERIAL_FORMAT
	 0x301A, 0x0058, 	// RESET_REGISTER
	 0x3004, 0x0004, 	// X_ADDR_START_
	 0x3002, 0x0004, 	// Y_ADDR_START_
	 0x3008, 0x0F03, 	// X_ADDR_END_
	 0x3006, 0x0873, 	// Y_ADDR_END_
	 0x3082, 0x0014, 	// OPERATION_MODE_CTRL
	 0x30BA, 0x1111, 	// DIGITAL_CTRL
	 0x323C, 0x8421, 	// ROW_TX_ENABLE
	 0x37E0, 0x8421, 	// ROW_TX_RO_ENABLE
	 0x3040, 0x0000, 	// READ_MODE
	 0x3044, 0x0000, 	// DARK_CONTROL
	 0x3180, 0x0020, 	// DELTA_DK_CONTROL
	 0x33E0, 0x0110, 	// TEST_ASIL_ROWS
	 0x33EE, 0x0000, 	// TEST_CTRL
	 0x32FC, 0x0000, 	// READ_MODE2
	 0x3418, 0x0000, 	// LRE_GAIN_GRR_RED
	 0x341A, 0x0000, 	// LRE_GAIN_BLU_GRB
	 0x31D0, 0x0001, 	// COMPANDING
	 0x3032, 0x0000, 	// SCALING_MODE
	 0x31AC, 0x0C0C, 	// DATA_FORMAT_BITS
	 0x300A, 0x0998, 	// FRAME_LENGTH_LINES_
	 0x300C, 0x10C8, 	// LINE_LENGTH_PCK_
	 0x3012, 0x00DE, 	// COARSE_INTEGRATION_TIME_
	 0x3212, 0x000D, 	// COARSE_INTEGRATION_TIME2
	 0x3216, 0x0001, 	// COARSE_INTEGRATION_TIME3
	 0x321A, 0x0000, 	// COARSE_INTEGRATION_TIME4
	 0x3238, 0x8222, 	// EXPOSURE_RATIO
	 0x32F6, 0x0001, 	// MIDDLE_INTEGRATION_CTRL
	 0x37A4, 0x0000, 	// COARSE_INTEGRATION_AD_TIME2
	 0x37A8, 0x0000, 	// COARSE_INTEGRATION_AD_TIME3
	 0x37AC, 0x0000, 	// COARSE_INTEGRATION_AD_TIME4
	 0x3C06, 0x00A4, 	// CONFIGURE_BUFFERS1
	 0x3C08, 0x0100, 	// CONFIGURE_BUFFERS2
	 0x34DC, 0x001B, 	// ASIL_EXT_CLK_COUNT_MSB_EXPECT
	 0x34DE, 0xDD52, 	// ASIL_EXT_CLK_COUNT_LSB_EXPECT
	 0x34E0, 0x0020, 	// ASIL_CLK_PIX_COUNT_MSB_EXPECT
	 0x34E2, 0xFEC0, 	// ASIL_CLK_PIX_COUNT_LSB_EXPECT
	 0x34E4, 0x0010, 	// ASIL_CLK_OP_COUNT_MSB_EXPECT
	 0x34E6, 0x7F60, 	// ASIL_CLK_OP_COUNT_LSB_EXPECT
	 0x34E8, 0x0010, 	// ASIL_CLK_REG_COUNT_MSB_EXPECT
	 0x34EA, 0x7F60, 	// ASIL_CLK_REG_COUNT_LSB_EXPECT
	 0x34EC, 0x0242, 	// ASIL_CLK_PIX_COUNT_100_EXT_EXPECT
	 0x34EE, 0x0121, 	// ASIL_CLK_OP_COUNT_100_EXT_EXPECT
	 0x34F0, 0x0121, 	// ASIL_CLK_REG_COUNT_100_EXT_EXPECT
	DELAY_FLAG, 0x20,
};

uint32_t ar0820_hdr_2exp_30fps_init_setting[] = {
	// Sensor AR0820 config
	DELAY_FLAG, 0x20,
	0x301a, 0x0058, 	// RESET_REGISTER_LOCK_REG = 88
	DELAY_FLAG, 0x20,
	0x2512, 0x8000,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xff07,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0x3001,
	0x2510, 0x3010,
	0x2510, 0x3006,
	0x2510, 0x3020,
	0x2510, 0x3008,
	0x2510, 0xb031,
	0x2510, 0xa824,
	0x2510, 0x003c,
	0x2510, 0x001f,
	0x2510, 0xb2f9,
	0x2510, 0x006f,
	0x2510, 0x0078,
	0x2510, 0x005c,
	0x2510, 0x106f,
	0x2510, 0xc013,
	0x2510, 0x006e,
	0x2510, 0x0079,
	0x2510, 0x007b,
	0x2510, 0xc806,
	0x2510, 0x106e,
	0x2510, 0x0017,
	0x2510, 0x0013,
	0x2510, 0x004b,
	0x2510, 0x0002,
	0x2510, 0x90f2,
	0x2510, 0x90ff,
	0x2510, 0xd034,
	0x2510, 0x1032,
	0x2510, 0x0000,
	0x2510, 0x0033,
	0x2510, 0x00d1,
	0x2510, 0x092e,
	0x2510, 0x1333,
	0x2510, 0x123d,
	0x2510, 0x045b,
	0x2510, 0x11bb,
	0x2510, 0x133a,
	0x2510, 0x1013,
	0x2510, 0x1017,
	0x2510, 0x1015,
	0x2510, 0x1099,
	0x2510, 0x14db,
	0x2510, 0x00dd,
	0x2510, 0x3088,
	0x2510, 0x3084,
	0x2510, 0x2003,
	0x2510, 0x11f9,
	0x2510, 0x02da,
	0x2510, 0xd80c,
	0x2510, 0x2006,
	0x2510, 0x017a,
	0x2510, 0x01f0,
	0x2510, 0x14f0,
	0x2510, 0x008b,
	0x2510, 0x10f8,
	0x2510, 0x118b,
	0x2510, 0x00ed,
	0x2510, 0x00e4,
	0x2510, 0x0072,
	0x2510, 0x203b,
	0x2510, 0x8828,
	0x2510, 0x2003,
	0x2510, 0x1064,
	0x2510, 0x0063,
	0x2510, 0x1072,
	0x2510, 0x003e,
	0x2510, 0xc00a,
	0x2510, 0x05cd,
	0x2510, 0x006e,
	0x2510, 0x100e,
	0x2510, 0x0019,
	0x2510, 0x0015,
	0x2510, 0x16ee,
	0x2510, 0x0071,
	0x2510, 0x10be,
	0x2510, 0x1063,
	0x2510, 0x1671,
	0x2510, 0x1095,
	0x2510, 0x1019,
	0x2510, 0x3088,
	0x2510, 0x3084,
	0x2510, 0x2003,
	0x2510, 0x018b,
	0x2510, 0x110b,
	0x2510, 0x117b,
	0x2510, 0x00e4,
	0x2510, 0x0072,
	0x2510, 0x20c4,
	0x2510, 0x1064,
	0x2510, 0x107a,
	0x2510, 0x1072,
	0x2510, 0x3041,
	0x2510, 0xd800,
	0x2510, 0x881a,
	0x2510, 0x100c,
	0x2510, 0x000e,
	0x2510, 0x100d,
	0x2510, 0x3081,
	0x2510, 0x10cb,
	0x2510, 0x1052,
	0x2510, 0x0038,
	0x2510, 0xc200,
	0x2510, 0xca00,
	0x2510, 0xd230,
	0x2510, 0x8200,
	0x2510, 0x11ae,
	0x2510, 0xb041,
	0x2510, 0xd000,
	0x2510, 0x106d,
	0x2510, 0x101f,
	0x2510, 0x100e,
	0x2510, 0x100a,
	0x2510, 0x3042,
	0x2510, 0x3086,
	0x2510, 0x102f,
	0x2510, 0x3090,
	0x2510, 0x9010,
	0x2510, 0xb000,
	0x2510, 0x30a0,
	0x2510, 0x1016,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x3508, 0xaa80,
	0x350a, 0xc5c0,
	0x350c, 0xc8c4,
	0x350e, 0x8c8c,
	0x3510, 0x8c88,
	0x3512, 0x8c8c,
	0x3514, 0xa0a0,
	0x3518, 0x0040,
	0x351a, 0x8600,
	0x351e, 0x0e40,
	0x3506, 0x004a,
	0x3520, 0x0e19,
	0x3522, 0x7f7f,
	0x3524, 0x7f7f,
	0x3526, 0x7f7f,
	0x3528, 0x7f7f,
	0x30fe, 0x00a8,
	0x3584, 0x0000,
	0x3540, 0x8308,
	0x354c, 0x0031,
	0x354e, 0x535c,
	0x3550, 0x5c7f,
	0x3552, 0x0011,
	0x3370, 0x0111,
	0x337a, 0x0f50,
	0x337e, 0xfff8,
	0x3110, 0x0011,
	0x3100, 0x4000,
	0x3364, 0x0173,
	0x3180, 0x0021,
	0x3e4c, 0x0404,
	0x3e52, 0x0060,
	0x3180, 0x0021,
	0x37a0, 0x0001,
	0x37a4, 0x0000,
	0x37a8, 0x0000,
	0x37ac, 0x0000,

	0x3e94, 0x3015,  	// TEMPVSENS1_SREG_TRIM0
	0x3372, 0xF50F,  	// DBLC_FS0_CONTROL

	0x302a, 0x0003,  	// VT_PIX_CLK_DIV
	0x302c, 0x0701,  	// VT_SYS_CLK_DIV
	0x302e, 0x0009,  	// PRE_PLL_CLK_DIV = 9
	0x3030, 0x009c,  	// PLL_MULTIPLIER
	0x3036, 0x0006,  	// OP_WORD_CLK_DIV
	0x3038, 0x0001,  	// OP_SYS_CLK_DIV = 1
	0x303a, 0x0085,  	// PLL_MULTIPLIER_ANA = 129
	0x303c, 0x0003,  	// PRE_PLL_CLK_DIV_ANA = 3

	0x31b0, 0x004a,  	// FRAME_PREAMBLE = 70
	0x31b2, 0x0027,  	// LINE_PREAMBLE = 37
	0x31b4, 0x5187,  	// MIPI_TIMING_0 = 20871
	0x31b6, 0x6288,  	// MIPI_TIMING_1 = 25159
	0x31b8, 0x710a,  	// MIPI_TIMING_2 = 24777
	0x31ba, 0x030a,  	// MIPI_TIMING_3 = 778
	0x31bc, 0x8a88,  	// MIPI_TIMING_4 = 35336
	0x31be, 0x0023,  	// MIPI_CONFIG_STATUS = 35
	0x31c8, 0x0abe,  	// MIPI_DESKEW_PAT_WIDTH = 2748
	0x31ae, 0x0204,  	// SERIAL_FORMAT = 516

	0x3004, 0x0004,  	// X_ADDR_START = 0
	0x3002, 0x0004,  	// Y_ADDR_START = 0
	0x3008, 0x0F03,  	// X_ADDR_END = 3847
	0x3006, 0x0873,  	// Y_ADDR_END = 2167

	0x3082, 0x0004,  	// OPERATION_MODE = 4
	0x30ba, 0x1101,  	// DIGITAL_CTRL = 4353
	0x323c, 0x8421,  	// ROW_TX_ENABLE = 33825
	0x37e0, 0x8421,  	// ROW_TX_RO_ENABLE = 33825
	0x3040, 0xC001,  	// READ_MODE = 0
	0x3044, 0x0000,  	// DARK_CONTROL = 0
	0x3180, 0x0020,  	// DELTA_DK_CONTROL = 32
	0x33e0, 0x0110,  	// TEST_ASIL_ROWS = 272
	0x33ee, 0x0000,  	// TEST_CTRL = 0
	0x32fc, 0x0000,  	// READ_MODE2 = 0
	0x3418, 0x0000,  	// LRE_GAIN_GRR_RED = 0
	0x341a, 0x0000,  	// LRE_GAIN_BLU_GRB = 0
	0x31d0, 0x0001,  	// COMPANDING = 1
	0x3032, 0x0000,  	// SCALING_MODE = 0
	0x31ac, 0x100C,  	// DATA_FORMAT_BITS

	0x300c, 0x0820,  	// LINE_LENGTH_PCK = 2080
	0x300a, 0x0920,  	// FRAME_LENGTH_LINE = 2336

	0x3012, 0x0028,  	// COARSE_INTEGRATION_TIME = 40
	0x3212, 0x0004,  	// COARSE_INTEGRATION_TIME2 = 1
	0x3216, 0x0001,  	// COARSE_INTEGRATION_TIME3 = 1
	0x321a, 0x0000,  	// COARSE_INTEGRATION_TIME4 = 0
	0x3238, 0x0212,  	// EXPOSURE_RATIO = 33314
	0x32f6, 0x0001,  	// MIDDLE_INTEGRATION_CTRL = 1
	0x37a4, 0x0000,  	// COARSE_INTEGRATION_AD_TIME2 = 0
	0x37a8, 0x0000,  	// COARSE_INTEGRATION_AD_TIME3 = 0
	0x37ac, 0x0000,  	// COARSE_INTEGRATION_AD_TIME4 = 0

	0x3c06, 0x00a4,  	// CONFIGURE_BUFFERS1 = 164
	0x3c08, 0x0100,  	// CONFIGURE_BUFFERS2 = 256
	0x3362, 0x00ff,  	// DC_GAIN
	0x3366, 0x0000,  	// ANALOG_GAIN
	0x336a, 0x0000,  	// ANALOG_GAIN2

	0x34dc, 0x000c,  	// ASIL_EXT_CLK_COUNT_MSB_EXPECT = 13
	0x34de, 0xD500,  	// ASIL_EXT_CLK_COUNT_LSB_EXPECT = 22630
	0x34e0, 0x000a,  	// ASIL_CLK_PIX_COUNT_MSB_EXPECT = 10
	0x34e2, 0x2400,  	// ASIL_CLK_PIX_COUNT_LSB_EXPECT = 9216
	0x34e4, 0x0025,  	// ASIL_CLK_OP_COUNT_MSB_EXPECT = 37
	0x34e6, 0x1200,  	// ASIL_CLK_OP_COUNT_LSB_EXPECT = 4608
	0x34e8, 0x0025,  	// ASIL_CLK_REG_COUNT_MSB_EXPECT = 37
	0x34ea, 0x1200,  	// ASIL_CLK_REG_COUNT_LSB_EXPECT = 4608
	0x34ec, 0x0242,  	// ASIL_CLK_PIX_COUNT_100_EXT_EXPECT = 556
	0x34ee, 0x0121,  	// ASIL_CLK_OP_COUNT_100_EXT_EXPECT = 278
	0x34f0, 0x0121,  	// ASIL_CLK_REG_COUNT_100_EXT_EXPECT = 278

	0x33C0, 0x2000,  	// OC_LUT_00
	0x33C2, 0x3450,  	// OC_LUT_01
	0x33C4, 0x48A0,  	// OC_LUT_02
	0x33C6, 0x5CF0,  	// OC_LUT_03
	0x33C8, 0x7140,  	// OC_LUT_04
	0x33CA, 0x8590,  	// OC_LUT_05
	0x33CC, 0x99E0,  	// OC_LUT_06
	0x33CE, 0xAE30,  	// OC_LUT_07
	0x33D0, 0xC280,  	// OC_LUT_08
	0x33D2, 0xD6D0,  	// OC_LUT_09
	0x33D4, 0xEB20,  	// OC_LUT_10
	0x33D6, 0xFF70,  	// OC_LUT_11
	0x33D8, 0xFF70,  	// OC_LUT_12
	0x33DA, 0xFF70,  	// OC_LUT_13
	0x33DC, 0xFF70,  	// OC_LUT_14
	0x33DE, 0xFF70,  	// OC_LUT_15

	0x37A0, 0x0001,  	// COARSE_INTEGRATION_AD_TIME
	0x37A4, 0x0001,  	// COARSE_INTEGRATION_AD_TIME2
	0x37A8, 0x0001,  	// COARSE_INTEGRATION_AD_TIME3
	0x37AC, 0x0000,  	// COARSE_INTEGRATION_AD_TIME4

	0x3280, 0x0FA0,  	// T1_BARRIER_C0
	0x3282, 0x0FA0,  	// T1_BARRIER_C1
	0x3284, 0x0FA0,  	// T1_BARRIER_C2
	0x3286, 0x0FA0,  	// T1_BARRIER_C3
	0x3288, 0x0FA0,  	// T1_BARRIER_C0
	0x328A, 0x0FA0,  	// T1_BARRIER_C1
	0x328C, 0x0FA0,  	// T1_BARRIER_C2
	0x328E, 0x0FA0,  	// T1_BARRIER_C3
	0x3290, 0x0FA0,  	// T1_BARRIER_C0
	0x3292, 0x0FA0,  	// T1_BARRIER_C1
	0x3294, 0x0FA0,  	// T1_BARRIER_C2
	0x3296, 0x0FA0,  	// T1_BARRIER_C3
	0x3298, 0x0FA0,  	// T1_BARRIER_C0
	0x329A, 0x0FA0,  	// T1_BARRIER_C1
	0x329C, 0x0FA0,  	// T1_BARRIER_C2
	0x329E, 0x0FA0,  	// T1_BARRIER_C3

	0x3100, 0x4000,  	// DLO_CONTROL0
	0x3102, 0x6064,  	// DLO_CONTROL1
	0x3104, 0x6064,  	// DLO_CONTROL2
	0x3106, 0x6064,  	// DLO_CONTROL3
	0x3108, 0x07D0,  	// DLO_CONTROL4
	0x3040, 0xC001,  	// READ_MODE
	DELAY_FLAG, 0x20,
};

uint32_t ar0820_hdr_3exp_30fps_init_setting[] = {
	// Sensor AR0820 config
	0x301a, 0x095D,
	DELAY_FLAG, 0xC8,
	0x301a, 0x0058,
	0x2512, 0x8000,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xff07,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0xffff,
	0x2510, 0x3001,
	0x2510, 0x3010,
	0x2510, 0x3006,
	0x2510, 0x3020,
	0x2510, 0x3008,
	0x2510, 0xb031,
	0x2510, 0xa824,
	0x2510, 0x003c,
	0x2510, 0x001f,
	0x2510, 0xb2f9,
	0x2510, 0x006f,
	0x2510, 0x0078,
	0x2510, 0x005c,
	0x2510, 0x106f,
	0x2510, 0xc013,
	0x2510, 0x006e,
	0x2510, 0x0079,
	0x2510, 0x007b,
	0x2510, 0xc806,
	0x2510, 0x106e,
	0x2510, 0x0017,
	0x2510, 0x0013,
	0x2510, 0x004b,
	0x2510, 0x0002,
	0x2510, 0x90f2,
	0x2510, 0x90ff,
	0x2510, 0xd034,
	0x2510, 0x1032,
	0x2510, 0x0000,
	0x2510, 0x0033,
	0x2510, 0x00d1,
	0x2510, 0x092e,
	0x2510, 0x1333,
	0x2510, 0x123d,
	0x2510, 0x045b,
	0x2510, 0x11bb,
	0x2510, 0x133a,
	0x2510, 0x1013,
	0x2510, 0x1017,
	0x2510, 0x1015,
	0x2510, 0x1099,
	0x2510, 0x14db,
	0x2510, 0x00dd,
	0x2510, 0x3088,
	0x2510, 0x3084,
	0x2510, 0x2003,
	0x2510, 0x11f9,
	0x2510, 0x02da,
	0x2510, 0xd80c,
	0x2510, 0x2006,
	0x2510, 0x017a,
	0x2510, 0x01f0,
	0x2510, 0x14f0,
	0x2510, 0x008b,
	0x2510, 0x10f8,
	0x2510, 0x118b,
	0x2510, 0x00ed,
	0x2510, 0x00e4,
	0x2510, 0x0072,
	0x2510, 0x203b,
	0x2510, 0x8828,
	0x2510, 0x2003,
	0x2510, 0x1064,
	0x2510, 0x0063,
	0x2510, 0x1072,
	0x2510, 0x003e,
	0x2510, 0xc00a,
	0x2510, 0x05cd,
	0x2510, 0x006e,
	0x2510, 0x100e,
	0x2510, 0x0019,
	0x2510, 0x0015,
	0x2510, 0x16ee,
	0x2510, 0x0071,
	0x2510, 0x10be,
	0x2510, 0x1063,
	0x2510, 0x1671,
	0x2510, 0x1095,
	0x2510, 0x1019,
	0x2510, 0x3088,
	0x2510, 0x3084,
	0x2510, 0x2003,
	0x2510, 0x018b,
	0x2510, 0x110b,
	0x2510, 0x117b,
	0x2510, 0x00e4,
	0x2510, 0x0072,
	0x2510, 0x20c4,
	0x2510, 0x1064,
	0x2510, 0x107a,
	0x2510, 0x1072,
	0x2510, 0x3041,
	0x2510, 0xd800,
	0x2510, 0x881a,
	0x2510, 0x100c,
	0x2510, 0x000e,
	0x2510, 0x100d,
	0x2510, 0x3081,
	0x2510, 0x10cb,
	0x2510, 0x1052,
	0x2510, 0x0038,
	0x2510, 0xc200,
	0x2510, 0xca00,
	0x2510, 0xd230,
	0x2510, 0x8200,
	0x2510, 0x11ae,
	0x2510, 0xb041,
	0x2510, 0xd000,
	0x2510, 0x106d,
	0x2510, 0x101f,
	0x2510, 0x100e,
	0x2510, 0x100a,
	0x2510, 0x3042,
	0x2510, 0x3086,
	0x2510, 0x102f,
	0x2510, 0x3090,
	0x2510, 0x9010,
	0x2510, 0xb000,
	0x2510, 0x30a0,
	0x2510, 0x1016,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x2510, 0x7fff,
	0x3508, 0xaa80,
	0x350a, 0xc5c0,
	0x350c, 0xc8c4,
	0x350e, 0x8c8c,
	0x3510, 0x8c88,
	0x3512, 0x8c8c,
	0x3514, 0xa0a0,
	0x3518, 0x0040,
	0x351a, 0x8600,
	0x351e, 0x0e40,
	0x3506, 0x004a,
	0x3520, 0x0e19,
	0x3522, 0x7f7f,
	0x3524, 0x7f7f,
	0x3526, 0x7f7f,
	0x3528, 0x7f7f,
	0x30fe, 0x00a8,
	0x3584, 0x0000,
	0x3540, 0x8308,
	0x354c, 0x0031,
	0x354e, 0x535c,
	0x3550, 0x5c7f,
	0x3552, 0x0011,
	0x3370, 0x0111,
	0x337a, 0x0f50,
	0x337e, 0xfff8,
	0x3110, 0x0011,
	0x3100, 0x4000,
	0x3364, 0x0173,
	0x3180, 0x0021,
	0x3e4c, 0x0404,
	0x3e52, 0x0060,
	0x3180, 0x0021,
	0x37a0, 0x0001,
	0x37a4, 0x0000,
	0x37a8, 0x0000,
	0x37ac, 0x0000,
	0x3e94, 0x3015,  	// TEMPVSENS1_SREG_TRIM0
	0x3e9c, 0x0000,  	// TEMPVSENS0_MUX_ADDR_EN_HI
	0x3e9e, 0x0000,  	// TEMPVSENS0_MUX_ADDR_EN_LO
	0x3f92, 0x5400,  	// TEMPVSENS1_TMG_CTRL
	0x3372, 0xf50f,  	// DBLC_FS0_CONTROL

	0x302a, 0x0003,  	// VT_PIX_CLK_DIV
	0x302c, 0x0701,
	0x302e, 0x0009,  	// PRE_PLL_CLK_DIV
	0x3030, 0x009c,  	// PLL_MULTIPLIER
	0x3036, 0x0006,
	0x3038, 0x0001,
	0x303a, 0x0085,
	0x303c, 0x0003,
	0x31b0, 0x0047,
	0x31b2, 0x0026,
	0x31b4, 0x5187,
	0x31b6, 0x5248,
	0x31b8, 0x70ca,
	0x31ba, 0x028a,
	0x31bc, 0x8a88,
	0x31be, 0x0023,

	0x3004, 0x0004,  	// X_ADDR_START_
	0x3002, 0x0004,  	// Y_ADDR_START_
	0x3008, 0x0F03,  	// X_ADDR_END_
	0x3006, 0x0873,  	// Y_ADDR_END_

	0x32fc, 0x0000,
	0x37e0, 0x8421,
	0x37e2, 0x8421,
	0x323c, 0x8421,
	0x323e, 0x8421,
	0x3040, 0x0000,  	// READ_MODE
	0x301D, 0x0000,  	// IMAGE_ORIENTATION
	0x3082, 0x0008,  	// OPERATION_MODE_CTRL
	0x30ba, 0x1112,  	// DIGITAL_CTRL
	0x3012, 0x0065,  	// COARSE_INTEGRATION_TIME_
	0x3212, 0x0009,  	// COARSE_INTEGRATION_TIME2
	0x3216, 0x0001,  	// COARSE_INTEGRATION_TIME3
	0x3238, 0x0334,  	// EXPOSURE_RATIO
	0x3c06, 0x1C88,  	// CONFIGURE_BUFFERS1
	0x3c08, 0x0100,  	// CONFIGURE_BUFFERS2
	0x31D0, 0x0001,  	// COMPANDING

	0x3362, 0x00ff,
	0x3366, 0x0000,
	0x336a, 0x0000,

	0x32F6, 0x0001,  	// MIDDLE_INTEGRATION_CTRL
	0x300c, 0x05c8,  	// LINE_LENGTH_PCK
	0x300a, 0x0922,  	// FRAME_LENGTH_LINES_

	0x33C0, 0x2000,  	// OC_LUT_00
	0x33C2, 0x3450,  	// OC_LUT_01
	0x33C4, 0x48A0,  	// OC_LUT_02
	0x33C6, 0x5CF0,  	// OC_LUT_03
	0x33C8, 0x7140,  	// OC_LUT_04
	0x33CA, 0x8590,  	// OC_LUT_05
	0x33CC, 0x99E0,  	// OC_LUT_06
	0x33CE, 0xAE30,  	// OC_LUT_07
	0x33D0, 0xC280,  	// OC_LUT_08
	0x33D2, 0xD6D0,  	// OC_LUT_09
	0x33D4, 0xEB20,  	// OC_LUT_10
	0x33D6, 0xFF70,  	// OC_LUT_11
	0x33D8, 0xFF70,  	// OC_LUT_12
	0x33DA, 0xFF70,  	// OC_LUT_13
	0x33DC, 0xFF70,  	// OC_LUT_14
	0x33DE, 0xFF70,  	// OC_LUT_15

	0x37A0, 0x0001,  	// COARSE_INTEGRATION_AD_TIME
	0x37A4, 0x0001,  	// COARSE_INTEGRATION_AD_TIME2
	0x37A8, 0x0001,  	// COARSE_INTEGRATION_AD_TIME3
	0x37AC, 0x0000,  	// COARSE_INTEGRATION_AD_TIME4

	0x3280, 0x0FA0,  	// T1_BARRIER_C0
	0x3282, 0x0FA0,  	// T1_BARRIER_C1
	0x3284, 0x0FA0,  	// T1_BARRIER_C2
	0x3286, 0x0FA0,  	// T1_BARRIER_C3
	0x3288, 0x0FA0,  	// T1_BARRIER_C0
	0x328A, 0x0FA0,  	// T1_BARRIER_C1
	0x328C, 0x0FA0,  	// T1_BARRIER_C2
	0x328E, 0x0FA0,  	// T1_BARRIER_C3
	0x3290, 0x0FA0,  	// T1_BARRIER_C0
	0x3292, 0x0FA0,  	// T1_BARRIER_C1
	0x3294, 0x0FA0,  	// T1_BARRIER_C2
	0x3296, 0x0FA0,  	// T1_BARRIER_C3
	0x3298, 0x0FA0,  	// T1_BARRIER_C0
	0x329A, 0x0FA0,  	// T1_BARRIER_C1
	0x329C, 0x0FA0,  	// T1_BARRIER_C2
	0x329E, 0x0FA0,  	// T1_BARRIER_C3

	0x3100, 0x4000,  	// DLO_CONTROL0
	0x3102, 0x6064,  	// DLO_CONTROL1
	0x3104, 0x6064,  	// DLO_CONTROL2
	0x3106, 0x6064,  	// DLO_CONTROL3
	0x3108, 0x07D0,  	// DLO_CONTROL4

	0x31ae, 0x0204,
    0x31ac, 0x140c,  	// DATA_FORMAT_BITS
    0x3064, 0x0000,
	0x301a, 0x005c,
	0x301a, 0x0058,

	0x3064, 0x0000,
	0x301a, 0x0058,
	0x3040, 0x0000,  	// READ_MODE
	DELAY_FLAG, 0x20,
};

uint32_t ar0820_hdr_3exp_galaxy_pwl_setting[] = {
	 0x33C0, 0x2000,     // OC_LUT_00
	 0x33C2, 0x4000,     // OC_LUT_01
	 0x33C4, 0x6000,     // OC_LUT_02
	 0x33C6, 0x8000,     // OC_LUT_03
	 0x33C8, 0xA000,     // OC_LUT_04
	 0x33CA, 0xC000,     // OC_LUT_05
	 0x33CC, 0xE000,     // OC_LUT_06
	 0x33CE, 0xF000,     // OC_LUT_07
	 0x33D0, 0xF400,     // OC_LUT_08
	 0x33D2, 0xF800,     // OC_LUT_09
	 0x33D4, 0xFC00,     // OC_LUT_10
	 0x33D6, 0xFFC0,     // OC_LUT_11
	 0x33D8, 0xFFC0,     // OC_LUT_12
	 0x33DA, 0xFFC0,     // OC_LUT_13
	 0x33DC, 0xFFC0,     // OC_LUT_14
	 0x33DE, 0xFFC0,     // OC_LUT_15
};

uint32_t ar0820_hdr_4exp_30fps_init_setting[] = {
	// Sensor AR0820 config
	 0x301A, 0x0059, 	// RESET_REGISTER
	// 0x05, 0x30, 0x30, 0x1A, 0x00, 0x58, 	// RESET_REGISTER
	 DELAY_FLAG, 0xC8,
	 0x301A, 0x0058, 	// RESET_REGISTER
	 0x2512, 0x8000, 	// SEQ_CTRL_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFF07, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0xFFFF, 	// SEQ_DATA_PORT
	 0x2510, 0x3001, 	// SEQ_DATA_PORT
	 0x2510, 0x3010, 	// SEQ_DATA_PORT
	 0x2510, 0x3006, 	// SEQ_DATA_PORT
	 0x2510, 0x3020, 	// SEQ_DATA_PORT
	 0x2510, 0x3008, 	// SEQ_DATA_PORT
	 0x2510, 0xB031, 	// SEQ_DATA_PORT
	 0x2510, 0xA824, 	// SEQ_DATA_PORT
	 0x2510, 0x003C, 	// SEQ_DATA_PORT
	 0x2510, 0x001F, 	// SEQ_DATA_PORT
	 0x2510, 0xB2F9, 	// SEQ_DATA_PORT
	 0x2510, 0x006F, 	// SEQ_DATA_PORT
	 0x2510, 0x0078, 	// SEQ_DATA_PORT
	 0x2510, 0x005C, 	// SEQ_DATA_PORT
	 0x2510, 0x106F, 	// SEQ_DATA_PORT
	 0x2510, 0xC013, 	// SEQ_DATA_PORT
	 0x2510, 0x006E, 	// SEQ_DATA_PORT
	 0x2510, 0x0079, 	// SEQ_DATA_PORT
	 0x2510, 0x007B, 	// SEQ_DATA_PORT
	 0x2510, 0xC806, 	// SEQ_DATA_PORT
	 0x2510, 0x106E, 	// SEQ_DATA_PORT
	 0x2510, 0x0017, 	// SEQ_DATA_PORT
	 0x2510, 0x0013, 	// SEQ_DATA_PORT
	 0x2510, 0x004B, 	// SEQ_DATA_PORT
	 0x2510, 0x0002, 	// SEQ_DATA_PORT
	 0x2510, 0x90F2, 	// SEQ_DATA_PORT
	 0x2510, 0x90FF, 	// SEQ_DATA_PORT
	 0x2510, 0xD034, 	// SEQ_DATA_PORT
	 0x2510, 0x1032, 	// SEQ_DATA_PORT
	 0x2510, 0x0000, 	// SEQ_DATA_PORT
	 0x2510, 0x0033, 	// SEQ_DATA_PORT
	 0x2510, 0x00D1, 	// SEQ_DATA_PORT
	 0x2510, 0x092E, 	// SEQ_DATA_PORT
	 0x2510, 0x1333, 	// SEQ_DATA_PORT
	 0x2510, 0x123D, 	// SEQ_DATA_PORT
	 0x2510, 0x045B, 	// SEQ_DATA_PORT
	 0x2510, 0x11BB, 	// SEQ_DATA_PORT
	 0x2510, 0x133A, 	// SEQ_DATA_PORT
	 0x2510, 0x1013, 	// SEQ_DATA_PORT
	 0x2510, 0x1017, 	// SEQ_DATA_PORT
	 0x2510, 0x1015, 	// SEQ_DATA_PORT
	 0x2510, 0x1099, 	// SEQ_DATA_PORT
	 0x2510, 0x14DB, 	// SEQ_DATA_PORT
	 0x2510, 0x00DD, 	// SEQ_DATA_PORT
	 0x2510, 0x3088, 	// SEQ_DATA_PORT
	 0x2510, 0x3084, 	// SEQ_DATA_PORT
	 0x2510, 0x2003, 	// SEQ_DATA_PORT
	 0x2510, 0x11F9, 	// SEQ_DATA_PORT
	 0x2510, 0x02DA, 	// SEQ_DATA_PORT
	 0x2510, 0xD80C, 	// SEQ_DATA_PORT
	 0x2510, 0x2006, 	// SEQ_DATA_PORT
	 0x2510, 0x017A, 	// SEQ_DATA_PORT
	 0x2510, 0x01F0, 	// SEQ_DATA_PORT
	 0x2510, 0x14F0, 	// SEQ_DATA_PORT
	 0x2510, 0x008B, 	// SEQ_DATA_PORT
	 0x2510, 0x10F8, 	// SEQ_DATA_PORT
	 0x2510, 0x118B, 	// SEQ_DATA_PORT
	 0x2510, 0x00ED, 	// SEQ_DATA_PORT
	 0x2510, 0x00E4, 	// SEQ_DATA_PORT
	 0x2510, 0x0072, 	// SEQ_DATA_PORT
	 0x2510, 0x203B, 	// SEQ_DATA_PORT
	 0x2510, 0x8828, 	// SEQ_DATA_PORT
	 0x2510, 0x2003, 	// SEQ_DATA_PORT
	 0x2510, 0x1064, 	// SEQ_DATA_PORT
	 0x2510, 0x0063, 	// SEQ_DATA_PORT
	 0x2510, 0x1072, 	// SEQ_DATA_PORT
	 0x2510, 0x003E, 	// SEQ_DATA_PORT
	 0x2510, 0xC00A, 	// SEQ_DATA_PORT
	 0x2510, 0x05CD, 	// SEQ_DATA_PORT
	 0x2510, 0x006E, 	// SEQ_DATA_PORT
	 0x2510, 0x100E, 	// SEQ_DATA_PORT
	 0x2510, 0x0019, 	// SEQ_DATA_PORT
	 0x2510, 0x0015, 	// SEQ_DATA_PORT
	 0x2510, 0x16EE, 	// SEQ_DATA_PORT
	 0x2510, 0x0071, 	// SEQ_DATA_PORT
	 0x2510, 0x10BE, 	// SEQ_DATA_PORT
	 0x2510, 0x1063, 	// SEQ_DATA_PORT
	 0x2510, 0x1671, 	// SEQ_DATA_PORT
	 0x2510, 0x1095, 	// SEQ_DATA_PORT
	 0x2510, 0x1019, 	// SEQ_DATA_PORT
	 0x2510, 0x3088, 	// SEQ_DATA_PORT
	 0x2510, 0x3084, 	// SEQ_DATA_PORT
	 0x2510, 0x2003, 	// SEQ_DATA_PORT
	 0x2510, 0x018B, 	// SEQ_DATA_PORT
	 0x2510, 0x110B, 	// SEQ_DATA_PORT
	 0x2510, 0x117B, 	// SEQ_DATA_PORT
	 0x2510, 0x00E4, 	// SEQ_DATA_PORT
	 0x2510, 0x0072, 	// SEQ_DATA_PORT
	 0x2510, 0x20C4, 	// SEQ_DATA_PORT
	 0x2510, 0x1064, 	// SEQ_DATA_PORT
	 0x2510, 0x107A, 	// SEQ_DATA_PORT
	 0x2510, 0x1072, 	// SEQ_DATA_PORT
	 0x2510, 0x3041, 	// SEQ_DATA_PORT
	 0x2510, 0xD800, 	// SEQ_DATA_PORT
	 0x2510, 0x881A, 	// SEQ_DATA_PORT
	 0x2510, 0x100C, 	// SEQ_DATA_PORT
	 0x2510, 0x000E, 	// SEQ_DATA_PORT
	 0x2510, 0x100D, 	// SEQ_DATA_PORT
	 0x2510, 0x3081, 	// SEQ_DATA_PORT
	 0x2510, 0x10CB, 	// SEQ_DATA_PORT
	 0x2510, 0x1052, 	// SEQ_DATA_PORT
	 0x2510, 0x0038, 	// SEQ_DATA_PORT
	 0x2510, 0xC200, 	// SEQ_DATA_PORT
	 0x2510, 0xCA00, 	// SEQ_DATA_PORT
	 0x2510, 0xD230, 	// SEQ_DATA_PORT
	 0x2510, 0x8200, 	// SEQ_DATA_PORT
	 0x2510, 0x11AE, 	// SEQ_DATA_PORT
	 0x2510, 0xB041, 	// SEQ_DATA_PORT
	 0x2510, 0xD000, 	// SEQ_DATA_PORT
	 0x2510, 0x106D, 	// SEQ_DATA_PORT
	 0x2510, 0x101F, 	// SEQ_DATA_PORT
	 0x2510, 0x100E, 	// SEQ_DATA_PORT
	 0x2510, 0x100A, 	// SEQ_DATA_PORT
	 0x2510, 0x3042, 	// SEQ_DATA_PORT
	 0x2510, 0x3086, 	// SEQ_DATA_PORT
	 0x2510, 0x102F, 	// SEQ_DATA_PORT
	 0x2510, 0x3090, 	// SEQ_DATA_PORT
	 0x2510, 0x9010, 	// SEQ_DATA_PORT
	 0x2510, 0xB000, 	// SEQ_DATA_PORT
	 0x2510, 0x30A0, 	// SEQ_DATA_PORT
	 0x2510, 0x1016, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x2510, 0x7FFF, 	// SEQ_DATA_PORT
	 0x3508, 0xAA80, 	// DAC_LD_8_9
	 0x350A, 0xC5C0, 	// DAC_LD_10_11
	 0x350C, 0xC8C4, 	// DAC_LD_12_13
	 0x350E, 0x8C8C, 	// DAC_LD_14_15
	 0x3510, 0x8C88, 	// DAC_LD_16_17
	 0x3512, 0x8C8C, 	// DAC_LD_18_19
	 0x3514, 0xA0A0, 	// DAC_LD_20_21
	 0x3518, 0x0040, 	// DAC_LD_24_25
	 0x351A, 0x8600, 	// DAC_LD_26_27
	 0x351E, 0x0E40, 	// DAC_LD_30_31
	 0x3506, 0x004A, 	// DAC_LD_6_7
	 0x3520, 0x0E19, 	// DAC_LD_32_33
	 0x3522, 0x7F7F, 	// DAC_LD_34_35
	 0x3524, 0x7F7F, 	// DAC_LD_36_37
	 0x3526, 0x7F7F, 	// DAC_LD_38_39
	 0x3528, 0x7F7F, 	// DAC_LD_40_41
	 0x3584, 0x0000, 	// ROW_AB_CTRL
	 0x3540, 0x8308, 	// DAC_LD_64_65
	 0x354C, 0x0031, 	// DAC_LD_76_77
	 0x354E, 0x535C, 	// DAC_LD_78_79
	 0x3550, 0x5C7F, 	// DAC_LD_80_81
	 0x3552, 0x0011, 	// DAC_LD_82_83
	 0x3370, 0x0111, 	// DBLC_CONTROL
	 0x337A, 0x0F50, 	// DBLC_SCALE0
	 0x337E, 0xFFF8, 	// DBLC_OFFSET0
	 0x3110, 0x0011, 	// HDR_CONTROL0
	 0x3100, 0x4000, 	// DLO_CONTROL0
	 0x3364, 0x0173, 	// DCG_TRIM
	 0x3180, 0x0021, 	// DELTA_DK_CONTROL
	 0x3E4C, 0x0404, 	// ROW_NOISE_DDK_FILTER_CONF
	 0x3E52, 0x0060, 	// ROW_NOISE_DDK_KERNEL_SIZE
	 0x3180, 0x0021, 	// DELTA_DK_CONTROL
	 0x37A0, 0x0001, 	// COARSE_INTEGRATION_AD_TIME
	 0x37A4, 0x0000, 	// COARSE_INTEGRATION_AD_TIME2
	 0x37A8, 0x0000, 	// COARSE_INTEGRATION_AD_TIME3
	 0x37AC, 0x0000, 	// COARSE_INTEGRATION_AD_TIME4
	 0x3E94, 0x3015, 	// TEMPVSENS1_SREG_TRIM0
	 0x3F92, 0x5400, 	// TEMPVSENS1_TMG_CTRL
	 0x3372, 0xF50F, 	// DBLC_FS0_CONTROL
	 0x302A, 0x0003, 	// VT_PIX_CLK_DIV
	 0x302C, 0x0701, 	// VT_SYS_CLK_DIV
	 0x302E, 0x0009, 	// PRE_PLL_CLK_DIV
	 0x3030, 0x009C, 	// PLL_MULTIPLIER
	 0x3036, 0x0006, 	// OP_WORD_CLK_DIV
	 0x3038, 0x0001, 	// OP_SYS_CLK_DIV
	 0x303A, 0x0085, 	// PLL_MULTIPLIER_ANA
	 0x303C, 0x0003, 	// PRE_PLL_CLK_DIV_ANA
	 0x31B0, 0x0047, 	// FRAME_PREAMBLE
	 0x31B2, 0x0026, 	// LINE_PREAMBLE
	 0x31B4, 0x5187, 	// MIPI_TIMING_0
	 0x31B6, 0x5248, 	// MIPI_TIMING_1
	 0x31B8, 0x70CA, 	// MIPI_TIMING_2
	 0x31BA, 0x028A, 	// MIPI_TIMING_3
	 0x31BC, 0x8A88, 	// MIPI_TIMING_4
	 0x31BE, 0x0023, 	// MIPI_CONFIG_STATUS
	 0x3002, 0x0004, 	// Y_ADDR_START_
	 0x3004, 0x0004, 	// X_ADDR_START_
	 0x3006, 0x0873, 	// Y_ADDR_END_
	 0x3008, 0x0F03, 	// X_ADDR_END_
	 0x32FC, 0x0000, 	// READ_MODE2
	 0x37E0, 0x8421, 	// ROW_TX_RO_ENABLE
	 0x37E2, 0x8421, 	// ROW_TX_RO_ENABLE_CB
	 0x323C, 0x8421, 	// ROW_TX_ENABLE
	 0x323E, 0x8421, 	// ROW_TX_ENABLE_CB
	 0x3040, 0x0001, 	// READ_MODE
	 0x301D, 0x0000,		// IMAGE_ORIENTATION_
	 0x3082, 0x000C, 	// OPERATION_MODE_CTRL
	 0x30BA, 0x1113, 	// DIGITAL_CTRL
	 0x3012, 0x004C, 	// COARSE_INTEGRATION_TIME_
	 0x3014, 0x0000, 	// FINE_INTEGRATION_TIME_
	 0x3212, 0x0001, 	// COARSE_INTEGRATION_TIME2
	 0x3216, 0x0001, 	// COARSE_INTEGRATION_TIME3
	 0x321A, 0x0000, 	// COARSE_INTEGRATION_TIME4
	 0x3238, 0x0222, 	// EXPOSURE_RATIO
	 0x32F6, 0x0001, 	// MIDDLE_INTEGRATION_CTRL
	 0x3C06, 0x246C, 	// CONFIGURE_BUFFERS1
	 0x3C08, 0x0114, 	// CONFIGURE_BUFFERS2
	 0x31D0, 0x0001, 	// COMPANDING
	 0x3362, 0x00FF, 	// DC_GAIN
	 0x3366, 0x0000, 	// ANALOG_GAIN
	 0x336A, 0x0000, 	// ANALOG_GAIN2
	 0x300C, 0x0450, 	// LINE_LENGTH_PCK_
	 0x300A, 0x0918, 	// FRAME_LENGTH_LINES_
	 0x33C0, 0x2000, 	// OC_LUT_00
	 0x33C2, 0x4000, 	// OC_LUT_01
	 0x33C4, 0x6000, 	// OC_LUT_02
	 0x33C6, 0x7000, 	// OC_LUT_03
	 0x33C8, 0x8000, 	// OC_LUT_04
	 0x33CA, 0x9000, 	// OC_LUT_05
	 0x33CC, 0x9800, 	// OC_LUT_06
	 0x33CE, 0xA000, 	// OC_LUT_07
	 0x33D0, 0xB000, 	// OC_LUT_08
	 0x33D2, 0xB800, 	// OC_LUT_09
	 0x33D4, 0xC000, 	// OC_LUT_10
	 0x33D6, 0xC800, 	// OC_LUT_11
	 0x33D8, 0xD000, 	// OC_LUT_12
	 0x33DA, 0xE000, 	// OC_LUT_13
	 0x33DC, 0xE800, 	// OC_LUT_14
	 0x33DE, 0xF000, 	// OC_LUT_15
	 0x37A0, 0x0001, 	// COARSE_INTEGRATION_AD_TIME
	 0x37A4, 0x0000, 	// COARSE_INTEGRATION_AD_TIME2
	 0x37A8, 0x0000, 	// COARSE_INTEGRATION_AD_TIME3
	 0x37AC, 0x0000, 	// COARSE_INTEGRATION_AD_TIME4
	 0x3280, 0x0FA0, 	// T1_BARRIER_C0
	 0x3282, 0x0FA0, 	// T1_BARRIER_C1
	 0x3284, 0x0FA0, 	// T1_BARRIER_C2
	 0x3286, 0x0FA0, 	// T1_BARRIER_C3
	 0x3288, 0x0FA0, 	// T2_BARRIER_C0
	 0x328A, 0x0FA0, 	// T2_BARRIER_C1
	 0x328C, 0x0FA0, 	// T2_BARRIER_C2
	 0x328E, 0x0FA0, 	// T2_BARRIER_C3
	 0x3290, 0x0FA0, 	// T3_BARRIER_C0
	 0x3292, 0x0FA0, 	// T3_BARRIER_C1
	 0x3294, 0x0FA0, 	// T3_BARRIER_C2
	 0x3296, 0x0FA0, 	// T3_BARRIER_C3
	 0x3298, 0x0FA0, 	// T4_BARRIER_C0
	 0x329A, 0x0FA0, 	// T4_BARRIER_C1
	 0x329C, 0x0FA0, 	// T4_BARRIER_C2
	 0x329E, 0x0FA0, 	// T4_BARRIER_C3
	 0x3100, 0x4000, 	// DLO_CONTROL0
	 0x3102, 0x6064, 	// DLO_CONTROL1
	 0x3104, 0x6064, 	// DLO_CONTROL2
	 0x3106, 0x6064, 	// DLO_CONTROL3
	 0x3108, 0x07D0, 	// DLO_CONTROL4
	 0x31AE, 0x0204, 	// SERIAL_FORMAT
	 0x31AC, 0x180C, 	// DATA_FORMAT_BITS
	 0x301A, 0x0058, 	// RESET_REGISTER
	DELAY_FLAG, 0x64,
	 0x3064, 0x0000, 	// SMIA_TEST
	 0x301A, 0x0058, 	// RESET_REGISTER

	// 0x04, 0xc4, 0x00, 0x02, 0xf3,  		// Video transmit enable
	// 0x04, 0x90, 0x03, 0x25, 0x80,  		// ignore frist frame
	// 0x04, 0x90, 0x03, 0x13, 0x02,  		// MIPI output enable
	DELAY_FLAG, 0x20,
};

uint32_t ar0820_awb_init_setting[] = {
	// awb rgain and bgian setting
	 0x3058, 0x0100,
	 0x35a2, 0x0100,
	 0x35aa, 0x0100,
	 0x305a, 0x008e,
	 0x35a4, 0x008e,
	 0x35ac, 0x008e,
};

uint32_t ar0820_pll_multiplier[] = {
	0x302a, 0x0004,     // VT_PIX_CLK_DIV
	0x3030, 0x00e1,  	// PLL_MULTIPLIER
	0x300c, 0x0438,     // LINE_LENGTH_PCK
	0x300a, 0x0c8a,     // FRAME_LENGTH_LINES_
};

uint32_t ar0820_pll_multiplier_hvkeep[] = {
	0x302e, 0x0019,     // VT_PIX_CLK_DIV
	0x3030, 0x01d4,     // PLL_MULTIPLIER
};

uint32_t ar0820_filp_mirror_disable[] = {
    0x3040, 0x0000,  	// READ_MODE
};

uint32_t ar0820_test_pattern[] = {
	0x3070, 0x0002,   	// TEST PATTERN
};

static uint32_t ar0820_extra_binning_setting[] = {
	0x32fc, 0x0003,   // binning: dig h&v.
};

static uint32_t ar0820_extra_binning10_setting[] = {
	0x32fc, 0x000a,   // binning: ana.
};

static uint32_t ar0820_weight_9331_scaling_setting[] = {
	0x3032, 0x0002,     // scaling: h&v.
    0x306e, 0x0000,     // scaling: weight 9:3:3:1.
};

static uint32_t ar0820_true_bayer_scaling_setting[] = {
	0x3032, 0x0002,     // scaling: h&v.
	0x306e, 0x0010,     // scaling: true bayer.
};

static uint32_t ar0820_weight_2110_scaling_setting[] = {
	0x3032, 0x0002,     // scaling: h&v.
	0x306e, 0x0020,     // scaling: weight 2:1:1:0.
};

uint32_t ar0820_stream_on_setting[] = {
	0x301a, 0x005c,
};

uint32_t ar0820_stream_off_setting[] = {
	0x301a, 0x0058,
};

uint32_t ar0820_sync_stream_off_setting[] = {
	0x301a, 0x0858,
};

uint32_t max9295_trigger_setting[] = {
    0x02D3, 0xf4,  // 1M,High prio,Jitter,ouput 1,GMSL2 rx,ouput en
    0x02D4, 0x67,  // pullup,push-pull,id = 7
    0x02D5, 0x07,  // id = 7
};

uint16_t ar0820_trigger_standard_setting[] = {
//  0x301A, 0x0058,  // RESET_REGISTER_RESET,RESET_REGISTER_STDBY_EOF
    0x301A, 0x0958,  // RESET_REGISTER_GPI_EN, FORCED_PLL_ON
    0x31C6, 0x2000,  // MASK_FRAMER_STANDBY
    0x30B0, 0x8100,  // PIXCLK_ON
    0x30CE, 0x0000,  // TRIGGER STANDARD MODE
    0x30CE, 0x0000,  // TRIGGER STANDARD MODE
};

uint16_t ar0820_trigger_shutter_sync_setting[] = {
//  0x301A, 0x0058,  // RESET_REGISTER_RESET,RESET_REGISTER_STDBY_EOF
    0x301A, 0x095C,  // RESET_REGISTER_GPI_EN, FORCED_PLL_ON, STREAM
    0x31C6, 0x2000,  // MASK_FRAMER_STANDBY
    0x30B0, 0x8100,  // PIXCLK_ON
    0x30CE, 0x0120,  // TRIGGER SHUTTER SYNC MODE
    0x30CE, 0x0120,  // TRIGGER SHUTTER SYNC MODE
};

uint16_t ar0820_trigger_gpio_setting[][8] = {
	{
		0x340A, 0x00EE,  // GPIO0_INPUT_ENABLE
		0x340A, 0x00EE,  // GPIO0_INPUT_ENABLE
		0x340C, 0x0002,  // GPIO_ISEL
		0x340E, 0x2100,  // GPIO_OSEL
	},
	{
		0x340A, 0x00DD,  // GPIO1_INPUT_ENABLE
		0x340A, 0x00DD,  // GPIO1_INPUT_ENABLE
		0x340C, 0x0008,  // GPIO_ISEL
		0x340E, 0x2100,  // GPIO_OSEL
	},
	{
		0x340A, 0x00BB,  // GPIO2_INPUT_ENABLE
		0x340A, 0x00BB,  // GPIO2_INPUT_ENABLE
		0x340C, 0x0020,  // GPIO_ISEL
		0x340E, 0x2010,  // GPIO_OSEL
	},
	{
		0x340A, 0x0077,  // GPIO3_INPUT_ENABLE
		0x340A, 0x0077,  // GPIO3_INPUT_ENABLE
		0x340C, 0x0080,  // GPIO_ISEL
		0x340E, 0x0210,  // GPIO_OSEL
	},
};

uint32_t ar0820_enalbe_embedded[] = {
	0x3064, 0x0100,
};

uint32_t ar0820_datatype_raw16[] = {
	0x3036, 0x0008,
	0x31ac, 0x1010,
	0x3342, 0x122e,
	0x300c, 0x1720,
};
#endif  // UTILITY_SENSOR_INC_AR0820STD_SETTING_H_
